<script setup>
import { inject } from 'vue';

  const count = inject('myCount')
  const countPlus = inject('myCountFn')
</script>

<template>
  <div class="box">
    子辈其实相当于祖辈来说, 就是孙辈
    <div>{{ count }}</div>
    <button @click="countPlus">+1</button>
  </div>
</template>

<style lang="scss" scoped></style>
